package com.example.demo.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class MyListener implements ApplicationListener<MyEven> {
    @Override
    public void onApplicationEvent(MyEven event) {
        System.out.println("事件处理："+event.getName());
    }
}
